/* draws the wire frame glut cube */
#include <Windows.h>
#include <GL/glut.h>         /* glut.h includes gl.h and glu.h */

void cubedisplay() {
	glClear(GL_COLOR_BUFFER_BIT);
	glMatrixMode(GL_MODELVIEW);
	gluLookAt(200.0, 100.0, 100.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
//	gluLookAt(80.0, 80.0, 100.0, 0.0, 0.0, 0.0, 0.0, 1.0,0.0);
	glutSolidCube(50);
	glutSwapBuffers();

}

void cubereshape(int w, int h) {
	glViewport(0, 0, w, h);
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	glOrtho(-1000.0, 1000.0, -1000.0, 1000.0, 10.0, 250.0);
}

void cubeinit() {
	glClearColor(0.0, 0.0, 0.0, 0.0);
	glColor3f(1.0, 1.0, 1.0);
}

int cubemain(int argc, char** argv) {
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
	glutInitWindowSize(500, 500);
	glutInitWindowPosition(0, 0);
	glutCreateWindow("cube");
	glutReshapeFunc(cubereshape);
	glutDisplayFunc(cubedisplay);
	cubeinit();
	glutMainLoop();
	return 0;
}
